package ywpt.service.query;

import java.util.List;

import ywpt.model.Query;
import ywpt.model.QueryField;

import org.hibernate.criterion.DetachedCriteria;

public interface QueryService {
	public abstract List<Query> getAllQueries();

	public abstract Query getQueryById(Long id);

	@SuppressWarnings("unchecked")
	public abstract List<Query> getQueries(DetachedCriteria query);

	@SuppressWarnings("unchecked")
	public abstract List<QueryField> getQueryFields(String queryCode);

	public abstract void removeQuery(Long id);

	public abstract int[] removeQueries(Long[] ids);

	public abstract void saveQuery(Query query);

	public abstract void updateQuery(Query query);
	
	public abstract QueryField getFieldType(String fieldCode);
	
	
}